// 导入全局变量
@import '../../styles/layout.less';

// 自定义变量
@section-spacing: 80px;
@card-border-radius: 12px;

.home-container {
  // 顶部横幅
  .hero-banner {
  height: 500px;
  background: linear-gradient(135deg, rgba(97, 100, 179, 0.8), rgba(124, 130, 243, 0.8)), url('/public/主页.png') no-repeat center center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: @section-spacing;
  position: relative;
  overflow: hidden;
  border-radius: @card-border-radius;
  box-shadow: @box-shadow;
  background-clip: padding-box; /* 设置背景裁切范围 */

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, transparent 20%, rgba(0, 0, 0, 0.2) 100%);
  }

  .hero-content {
    text-align: center;
    color: white;
    z-index: 1;
    padding: 0 20px;
    /* 原有内容... */
      
      h1 {
        font-size: 3.5rem;
        font-weight: 700;
        margin-bottom: 16px;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
      }
      
      p {
        font-size: 1.5rem;
        margin-bottom: 32px;
        text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
      }
      
      .hero-button {
        font-size: 1.1rem;
        height: auto;
        padding: 10px 30px;
        background: linear-gradient(135deg, @primary-color, @secondary-color);
        border: none;
        box-shadow: 0 5px 15px rgba(78, 84, 200, 0.4);
        transition: @transition-base;
        
        &:hover {
          transform: translateY(-3px);
          box-shadow: 0 8px 20px rgba(78, 84, 200, 0.6);
        }
      }
    }
  }
  
  // 标题装饰器
  .title-decorator {
    display: inline-block;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, @primary-color, @secondary-color);
    margin: 0 15px;
    vertical-align: middle;
  }
  
  // 实验室简介
  .lab-intro {
    margin-bottom: @section-spacing;
    
    h2.ant-typography {
      text-align: center;
      margin-bottom: 40px;
    }
    
    .intro-image-container {
      position: relative;
      height: 300px;
      
      .intro-image {
        width: 100%;
        height: 100%;
        background: url('/public/实验室海报.jpg') no-repeat center center;
        background-size: cover;
        border-radius: @card-border-radius;
        box-shadow: @box-shadow;
        position: relative;
        z-index: 2;
      }
      
      .intro-image-decorator {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 20px;
        left: 20px;
        border: 2px solid @primary-color;
        border-radius: @card-border-radius;
        z-index: 1;
      }
    }
    
    .intro-paragraph {
      font-size: 1.1rem;
      line-height: 1.8;
      color: rgba(0, 0, 0, 0.7);
    }
  }

  // 研究方向
  .research-directions {
    margin-bottom: @section-spacing;
    
    h2.ant-typography {
      text-align: center;
      margin-bottom: 40px;
    }

    .direction-card {
      height: 100%;
      text-align: center;
      transition: @transition-base;
      border-radius: @card-border-radius;
      overflow: hidden;
      border: none;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);

      &:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
      }

      .direction-icon-container {
        margin: 20px 0;
      }

      .direction-icon {
        font-size: 60px;
        background: linear-gradient(135deg, @primary-color, @secondary-color);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
      }

      h3.ant-typography {
        margin-bottom: 16px;
        font-weight: 600;
        position: relative;
        display: inline-block;
        
        &::after {
          content: '';
          position: absolute;
          bottom: -8px;
          left: 50%;
          transform: translateX(-50%);
          width: 40px;
          height: 2px;
          background: linear-gradient(90deg, @primary-color, @secondary-color);
        }
      }
      
      .ant-typography {
        color: rgba(0, 0, 0, 0.7);
      }
      
      .learn-more-btn {
        margin-top: 10px;
        color: @primary-color;
        font-weight: 500;
        transition: @transition-base;
        
        &:hover {
          color: @secondary-color;
          transform: translateX(5px);
        }
      }
    }
  }
  
  // 实验室成果
  .lab-achievements {
    margin-bottom: @section-spacing;
    
    .achievements-content {
      padding: 60px 0;
      background: linear-gradient(135deg, rgba(78, 84, 200, 0.05), rgba(143, 148, 251, 0.05));
      border-radius: @card-border-radius;
      
      h2.ant-typography {
        text-align: center;
        margin-bottom: 40px;
      }
      
      .achievement-card {
        text-align: center;
        border: none;
        background: white;
        border-radius: @card-border-radius;
        box-shadow: @box-shadow;
        transition: @transition-base;
        
        &:hover {
          transform: translateY(-5px);
          box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        }
        
        .ant-statistic-title {
          font-size: 1.1rem;
          color: rgba(0, 0, 0, 0.7);
          margin-bottom: 10px;
        }
        
        .ant-statistic-content {
          font-size: 2.5rem;
          font-weight: 700;
        }
      }
    }
  }
  
  // 核心优势
  .core-advantages {
    margin-bottom: @section-spacing;
    
    h2.ant-typography {
      text-align: center;
      margin-bottom: 40px;
    }
    
    .advantage-card {
      height: 100%;
      text-align: center;
      border: none;
      border-radius: @card-border-radius;
      box-shadow: @box-shadow;
      transition: @transition-base;
      padding: 20px;
      
      &:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
      }
      
      .advantage-icon {
        font-size: 50px;
        color: @primary-color;
        margin-bottom: 20px;
      }
      
      h3.ant-typography {
        margin-bottom: 16px;
        font-weight: 600;
      }
      
      .ant-typography {
        color: rgba(0, 0, 0, 0.7);
      }
    }
  }
}

// 响应式设计
//针对平板及以下设备
@media (max-width: 768px) {
  .home-container {
    .hero-banner {
      height: 400px;
      
      .hero-content {
        h1 {
          font-size: 2.5rem;
        }
        
        p {
          font-size: 1.2rem;
        }
        
        .hero-button {
          padding: 8px 20px;
          font-size: 1rem;
        }
      }
    }
    
    .lab-intro, .research-directions, .lab-achievements, .core-advantages {
      margin-bottom: 60px;
      
      h2.ant-typography {
        margin-bottom: 30px;
        font-size: 1.8rem;
      }
    }
    
    .intro-image-container {
      margin-bottom: 30px;
    }
    
    .intro-paragraph {
      font-size: 1rem !important;
    }
    
    .achievement-card {
      .ant-statistic-title {
        font-size: 0.9rem !important;
      }
      
      .ant-statistic-content {
        font-size: 2rem !important;
      }
    }
  }
}
//针对手机等小屏幕设备
@media (max-width: 576px) {
  .home-container {
    .hero-banner {
      height: 350px;
      
      .hero-content {
        h1 {
          font-size: 2rem;
        }
        
        p {
          font-size: 1rem;
          margin-bottom: 20px;
        }
      }
    }
    
    .title-decorator {
      width: 20px;
      margin: 0 10px;
    }
    
    .lab-achievements {
      .achievements-content {
        padding: 40px 0;
      }
    }
    
    .advantage-card {
      margin-bottom: 20px;
    }
  }
}